from rest_framework import serializers
from course.models import exam, work, exam_topic, work_topic


# 基于试卷协同过滤序列化
class base_examSerializers(serializers.ModelSerializer):
    class Meta:
        model = exam
        fields = '__all__'


# 基于作业协同过滤序列化
class base_workSerializers(serializers.ModelSerializer):
    class Meta:
        model = work
        fields = '__all__'


# 试卷id详情序列化
class exam_topicIdSerializers(serializers.ModelSerializer):
    class Meta:
        model = exam_topic
        fields = ['exam_id']


# 作业id详情序列化
class work_topicIdSerializers(serializers.ModelSerializer):
    class Meta:
        model = work_topic
        fields = ['work_id']


# 作业详情序列化
class work_topicSerializers(serializers.ModelSerializer):
    class Meta:
        model = work_topic
        fields = '__all__'


# 试卷详情序列化
class exam_topicSerializers(serializers.ModelSerializer):
    class Meta:
        model = exam_topic
        fields = '__all__'


class BrowsingHistoryESerializer(serializers.ModelSerializer):

    class Meta:
        model = exam
        fields = '__all__'


class BrowsingHistoryWSerializer(serializers.ModelSerializer):

    class Meta:
        model = work
        fields = '__all__'


class ESerializer(serializers.ModelSerializer):

    class Meta:
        model = exam
        fields = '__all__'


class WSerializer(serializers.ModelSerializer):

    class Meta:
        model = work
        fields = '__all__'
